import React from 'react';
import './App.css';
/* 标签属性 */
export default function App() {
  let richHtml = "<span style='color:red'>红色</span>";
  let props = {
    data: 1,
    num: 2,
    class: {
      red: true,
    },
  };
  return (
    <div>
      {/* class => className */}
      <h1 className='red'>红色</h1>
      {/* label => for 属性 => htmlFor */}
      <label htmlFor='text'>
        label标签
        <input type='text' name='text' />
      </label>
      {/* <section data={1} num={2}>
        属性
      </section> */}
      <section {...props}>属性</section>
      {/*  vue v-html  */}
      <header>{richHtml}</header>
      <header dangerouslySetInnerHTML={{ __html: richHtml }}></header>
    </div>
  );
}
